<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
	<title>{$webname}-后台</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/login/css/style.css">
	<script src="__PUBLIC__/login/js/jquery-1.7.2.min.js" type="text/javascript"></script>
	<link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" type="text/css"/>
	<script src="__PUBLIC__/layui/layui.all.js" type="text/javascript"></script>
	<style type="text/css">
		input::-webkit-input-placeholder {
        /* placeholder颜色  */
        color: #fff;
    }
	</style>
</head>


<body>
	<div class="logo_box">
		<h3>{$webname}</h3>
		<form>
			<div class="input_outer">
				<span class="u_user"></span>
				<input id="username" name="username" class="text" placeholder="用户名" style="color: #FFFFFF !important;" type="text" value="1">
			</div>
			<div class="input_outer">
				<span class="us_uer"></span>
				
				<input id="password" name="password" class="text" style="color: #FFFFFF !important; " placeholder="密码" value="2" type="password" >
			</div>
			<div class="mb2"><a class="act-but submit" href="javascript:;" id="btn_login" style="color: #FFFFFF">登录</a></div>
		</form>
		
	</div>

</body>
</html>

<script type="text/javascript">
	$('#btn_login').click(function() {
		var username = $('#username').val();
		var password = $('#password').val();

		if (username == '' || password == '' ) {
			layer.msg('账号或密码不能为空');
		}else{
			$.ajax({
	            type: "post",
	            url: "{:U('common/ctrl_Login')}",
	            data: {
	            	username:username,
	            	password:password,
	            	},
	            dataType: "json",
	            success: function(rtJson){
	               	if (rtJson.code == 100) {
	               		
	               		var index = layer.load(1, {
									  shade: [0.1,'#fff'] //0.1透明度的白色背景
									});
	               		window.location.href = "{:U('Index/index')}";
	               		
	               	}else{
	               		layer.msg(rtJson.msg);
	               	}
	               
	            }
	        });
	        return false;
		}
	});
</script>